package org.headquarter.xml;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.PropertyConfigurator;
import org.boxlayout.gui.BoxLayoutEngine;
import org.headquarter.object.Document;
import org.headquarter.object.Node;
import org.headquarter.xml.annotation.XmlSerialize;


public class XmlManager {

    Log log = LogFactory.getLog(getClass());
    
    
   

    public String convertToXmlString(Node node){
	log.debug(node.getClass().getAnnotations());
	for(Field field : node.getClass().getFields()){
	    log.debug("loop");
	    Annotation a = field.getAnnotation(XmlSerialize.class);
	    if(a!=null){
		log.debug("field "+a.toString()+" is serialized");
	    }else{
		log.debug("field "+a.toString()+" is not serialized");
		
	    }
	}


	return null;
    }
    
    
    public static void main(String[] args) {
	PropertyConfigurator.configure("log4j.properties");
	new XmlManager().convertToXmlString(new Document());
    }

}
